package com.day11_IO_test;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @ClassName: Demo
 * @Author: zw
 * @Description: 出百万拳，行万里路；
 * @Create 2024/3/17-11:06
 * @Version 1.0
 */
public class Demo {
    public static void main(String[] args) throws IOException {
        // 读 fileInputstream
        // 写 fileoutstream
        FileInputStream rfs = new FileInputStream("/Users/mzhaowang/Desktop/Java/lianxi/java_web/coding_bilibli/test/src/com/day11_IO_test/file.txt");
        FileOutputStream ofs = new FileOutputStream("/Users/mzhaowang/Desktop/Java/lianxi/java_web/coding_bilibli/test/src/com/day11_IO_test/file1.txt");
        int b;
        while ((b = rfs.read()) != -1) {
            ofs.write(b);
        }
        rfs.close();
        ofs.close();
    }
}
